﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 委托
{
    public delegate void MyDelegate1();
    class Program
    {
        static void Main(string[] args)
        {
            MyDelegate1 myDelegate1 = new MyDelegate1(func1);
            myDelegate1 += func2;
            myDelegate1();
            Console.ReadKey();
        }

        static void func1()
        {
            Console.WriteLine("func1");
        }
        static void func2()
        {
            Console.WriteLine("func2");
        }
    }
}
